package com.iule.common.playboy.controller.open;

import com.alibaba.fastjson.JSONObject;
import com.iule.common.playboy.service.IControlConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * @author 柚子
 * @date {2020/3/13}
 */
@RestController
@RequestMapping("/playboy/config")
@Api(tags = {"【对外】配置项相关Api"})
public class ConfigApi {

    private final IControlConfigService controlConfigService;

    @Autowired
    public ConfigApi(IControlConfigService controlConfigService) {
        this.controlConfigService = controlConfigService;
    }

    @ApiOperation(value = "根据key")
    @PostMapping(value = "/{appId}/{key}")
    public ResponseEntity getConfigByExactlyWord(
            @PathVariable("appId") String appId,
            @PathVariable("key") String key,
            @RequestBody JSONObject condition
            ) {
        System.out.println(key);
        System.out.println(condition);
        return null;
    }

}
